load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("build_infra")

rust_library(
    name = "buck2_http",
    srcs = glob(["src/**/*.rs"]),
    os_deps = [
        (
            "linux",
            [
                "fbsource//third-party/rust:hyperlocal-0-9",
            ],
        ),
        (
            "macos",
            [
                "fbsource//third-party/rust:hyperlocal-0-9",
            ],
        ),
    ],
    test_deps = [
        "fbsource//third-party/rust:httptest-0-16",
    ],
    test_os_deps = [
        (
            "linux",
            [
                "fbsource//third-party/rust:tempfile",
            ],
        ),
        (
            "macos",
            [
                "fbsource//third-party/rust:tempfile",
            ],
        ),
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:http-1",
        "fbsource//third-party/rust:http-body-util",
        "fbsource//third-party/rust:hyper-1-5-1",
        "fbsource//third-party/rust:hyper-proxy2",
        "fbsource//third-party/rust:hyper-rustls-0-26",
        "fbsource//third-party/rust:hyper-timeout-0-5",
        "fbsource//third-party/rust:hyper-util",
        "fbsource//third-party/rust:ipnetwork",
        "fbsource//third-party/rust:pin-project",
        "fbsource//third-party/rust:rustls-0-22",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tokio-rustls-0-25",
        "fbsource//third-party/rust:tokio-util",
        "fbsource//third-party/rust:tower-service",
        "fbsource//third-party/rust:tracing",
        "//buck2/allocative/allocative:allocative",
        "//buck2/app/buck2_certs:buck2_certs",
        "//buck2/app/buck2_error:buck2_error",
        "//buck2/gazebo/dupe:dupe",
        # @oss-disable[end= ]: "//common/rust/cpe:cpe",
    ],
)
